require 'openssl'

int = OpenSSL::ASN1::Integer.new(1)
str = OpenSSL::ASN1::PrintableString.new('abc')
sequence = OpenSSL::ASN1::Sequence.new([int, str])

der = sequence.to_der

open 'rubytest.der', 'w' do |io|
  io.write der
end
